from gluster import gfapi
import sys

def main(host,vol):
    try:
        volume = gfapi.Volume(host,vol)
        volume.mount()
        volume.rmtree("/",ignore_errors=True)
        volume.umount()
    except Exception , e:
        print 'clean files failed %s' % e
    else:
        print 'true'

if __name__ == "__main__":
    if len(sys.argv) != 3:
        print 'clean files python cmd args failed, and argv num is %d' % len(sys.argv)
        exit(1)
    main(sys.argv[1],sys.argv[2])